﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp4
{
    public partial class Form3 : Form
    {
        public Form3()
        {
            InitializeComponent();
        }
        //确认
        private void button1_Click(object sender, EventArgs e)
        {

       
            
           string a= textBox1.Text;
           string b= textBox2.Text;
            //条件判断：
            string c= textBox3.Text;
            //不能为空
            bool saf = b != null;
            //密码与确认密码不能相等
            bool flag = b == c;
            
            if (flag && a!=null && saf)
            {

                Form1 form1 = new Form1();
                Form1.users.Add(a,b);
                MessageBox.Show("注册成功！");
                this.Close();

            }

            else
            {

            }
        }
        //取消
        private void button2_Click(object sender, EventArgs e)
        {

        }
    }
}
